<?php
class Model_DbTable_Gallery extends Apps_Db_Table_Abstract {
	protected $_name = 'gallery';

	const STATUS_ACTIVE   = 1;
	const STATUS_INACTIVE = 0;
	const STATUS_DELETED  = -1;

	public function getListActive() {
	    $q = $this->_db
            	    ->select()
            	    ->from('gallery')
            	    ->where('gallery.status = ?', self::STATUS_ACTIVE)
            	    ->limit(6)
            	    ->order('sorting_number');
	    return $q;
	}
}